#include <Uefi.h>
#include <Library/UefiLib.h>
#include <Library/UefiBootServicesTableLib.h>

EFI_GUID gEfiDriverTestGuid = { 0x2afceb91, 0x88f2, 0x4f91, { 0xb0, 0x5e, 0x7f, 0x43, 0x1a, 0xec, 0xfd, 0x52 } };

typedef 
EFI_STATUS
(*DRIVER_TEST)(VOID);

typedef struct _EFI_DRIVER_TEST_PROTOCOL {
  DRIVER_TEST PrintHelloWorld;
} EFI_DRIVER_TEST_PROTOCOL;

EFI_STATUS
EFIAPI
PrintHelloWorld(VOID)
{
  Print(L"Hello, World!\n");
  return EFI_SUCCESS;
}

STATIC EFI_DRIVER_TEST_PROTOCOL mDriverTest = {
  PrintHelloWorld
};

EFI_STATUS
EFIAPI
DriverTestEntryPoint(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE  *SystemTable)
{
  EFI_STATUS Status;

  Status = gBS->InstallProtocolInterface(
                  &ImageHandle,
                  &gEfiDriverTestGuid,
                  EFI_NATIVE_INTERFACE,
                  &mDriverTest
                  );
  if (EFI_ERROR(Status)) {
    return Status;
  }

  return EFI_SUCCESS;
}